<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>Task (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">testing.PerformanceTimer.Task</span>
        <span>Extends</span>
        <span class="fn-name">
          Object
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    A task for the performance timer to measure. Callers can specify optional
setUp and tearDown methods to control state before and after each run of the
test function.
  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_testing_performancetimer.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/closure/goog/testing/performancetimer.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td>goog.testing.PerformanceTimer.Task</td><td></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.testing.PerformanceTimer.Task(<span><span class="arg">test</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">test</span>
        : <div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">Test function whose performance is to be measured.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_PerformanceTimer_Task.html">
              goog.testing.PerformanceTimer.Task
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.getSetUp"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getSetUp<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>&nbsp;
            The set up function or the default no-op function if none was specified.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line381">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.getTearDown"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getTearDown<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>&nbsp;
            The tear down function or the default no-op function if none was specified.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line403">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.getTest"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getTest<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>&nbsp;
            The test function to time.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line359">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.setUp_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setUp_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       An optional set up function to run before each invocation of the test
function.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line343">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.tearDown_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">tearDown_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       An optional tear down function to run after each invocation of the test
function.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line352">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.test_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">test_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       The test function to time.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line333">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.withSetUp"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">withSetUp<span class="args">(<span class="arg">setUp</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_testing_PerformanceTimer_Task.html">goog.testing.PerformanceTimer.Task</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Specifies a set up function to be invoked before each invocation of the test
function.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">setUp</span>
        : <div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The set up function.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_testing_PerformanceTimer_Task.html">goog.testing.PerformanceTimer.Task</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            This task.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line371">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.Task.prototype.withTearDown"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">withTearDown<span class="args">(<span class="arg">tearDown</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_testing_PerformanceTimer_Task.html">goog.testing.PerformanceTimer.Task</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Specifies a tear down function to be invoked after each invocation of the
test function.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">tearDown</span>
        : <div class="fullType"><span class="type">function (): (goog.async.Deferred</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The tear down function.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_testing_PerformanceTimer_Task.html">goog.testing.PerformanceTimer.Task</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            This task.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_performancetimer.js.source.html#line393">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




















<div class="section">
  <table class="horiz-rule">


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package testing.PerformanceTimer</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="testing.PerformanceTimer.Task"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
